extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[稀有]复读机"
	info = "佩戴者每次施放技能，会立即再施放一次\n一个角色只能携带一件本装备，仅对有冷却的技能生效，对固化技能无效\n[color=#DC143C]同时装备两件时可升级[/color]"
	price = 300
	att.cd = -0.2
	
func _connect():
	._connect()
	for i in masCha.items:
		if i.id == id and i != self:
			delFromCha()
			return
	masCha.connect("onCastCdSkill", self, "onCastCdSkill")

var enable = true
func onCastCdSkill(id):
	if enable:
		var skill = masCha.getSkill(id)
		enable = false
		skill.nowTime += skill.cd

func _upS():
	enable = true

func upgrade():
	name = "[color=#FFFF00][史诗]复读机"
	info = "佩戴者每次施放技能，会立即再施放一次\n一个角色只能携带一件本装备"
	att.cd = 0